package com.example.spring.bean3;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * ClassName:User
 * Package:com.example.spring.bean3
 * Description:
 *
 * @Author:ZhangXin
 * @Create:2023/5/10-8:37
 * @Version:v1.0
 */
@Component
public class Product {
    @Value("隔壁老王")
    private String name;

    @Value("30")
    private Integer age;

    @Override
    public String toString() {
        return "User{" +
               "name='" + name + '\'' +
               ", age=" + age +
               '}';
    }
}
